cc.Class({
    extends: cc.Component,

    properties: {
        bg:cc.Node,
    
    },

    
    onLoad: function () {
        this.velocity = 0;


    },

    onStartDrop:function(){
        //点击事件
        this.bg.on("touchstart",this.onJump.bind(this));
        this.schedule(this.onDrop.bind(this),cc.myData.BIRE_DROP_INTERVAL);
    },

    onDrop:function(){
        this.node.y -= this.velocity;
        this.velocity += cc.myData.GRAVITY;

    },

    onJump:function(){
        this.velocity = cc.myData.JUMPVALUE;
    }


});
